

@RestController
@RequestMapping("/dmsMachineManagement")
public class DmsMachineManagementController {

    @Resource
    private DmsMachineManagementService dmsMachineManagementService;


    /**
     * 获取 DmsMachineManagement 分页列表
     */
    @GetMapping("/pagination")
    public Ret getDmsMachineManagementPagination( PaginationVo paginationVo, DmsMachineManagementQuery dmsMachineManagementQuery ) throws Exception {
        IPage page = dmsMachineManagementService.getDmsMachineManagementPagination(paginationVo, dmsMachineManagementQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 DmsMachineManagement 所有数据
     */
    @GetMapping("/all")
    public Ret getDmsMachineManagementAllList( DmsMachineManagementQuery dmsMachineManagementQuery ) throws Exception {
        List<DmsMachineManagementEntity> list = dmsMachineManagementService.getDmsMachineManagementAllList( dmsMachineManagementQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 DmsMachineManagement 详情
    */
   @GetMapping("/{id}")
   public Ret getDmsMachineManagementDetail(@PathVariable Long id) throws Exception {

       DmsMachineManagementEntity dmsMachineManagement = dmsMachineManagementService.getDmsMachineManagementDetail(id);
       return Ret.ok(dmsMachineManagement);
   }


    /**
     * 新增 DmsMachineManagement
     * */
    @PostMapping("")
    public Ret addDmsMachineManagement(@RequestBody DmsMachineManagementVo dmsMachineManagementVo) throws Exception {

        dmsMachineManagementService.addDmsMachineManagement(dmsMachineManagementVo);
        return Ret.ok();
    }


    /**
     * 更新 DmsMachineManagement
     * */
    @PutMapping("")
    public Ret updateDmsMachineManagement(@RequestBody DmsMachineManagementVo dmsMachineManagementVo) throws Exception {

        dmsMachineManagementService.updateDmsMachineManagement(dmsMachineManagementVo);
        return Ret.ok();
    }


    /**
     * 删除 DmsMachineManagement
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveDmsMachineManagement( @RequestBody List<Long> ids ) throws Exception {

        dmsMachineManagementService.batchRemoveDmsMachineManagement(ids);
        return Ret.ok();
    }
}

  